public class Main {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		GUI gui = new GUI("tr-sim", 800, 500, 100, 100);
		SimulationPanel simpanel = new SimulationPanel(800, 500);
		
		RandomCar r1 = new RandomCar(1, new Position(200, 200), 10, Math.PI/2, 2, -0.2);
		simpanel.addVehicle(r1);
		gui.addPanel(simpanel);
		
		int simRounds = 70;
		for(int i = 0; i <= simRounds; i++){
			simpanel.addVehicle(new RandomCar(i, new Position(r1.position.x, r1.position.y), 0, r1.heading, 0, 0));
			r1.move(1);
			simpanel.repaint();
			Thread.sleep(25);
		}
	}
}
